home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
8bit
/
cislib_a
/
bemer.bas
< prev
next >
Wrap
BASIC Source File
|
1995-04-22
|
8KB
|
222 lines
0 REM ** COMPUTE! ** APR 84 ** PAGE 74 **
5 SCREEN=PEEK(88)+256*PEEK(89)
10 GOTO 5000
100 POKE 53761,0:S=STICK(0):FOR D=1 TO SPEED:NEXT D
110 IF S=7 OR S=6 OR S=5 THEN DXA=1:DYA=0:DIR=1:IF ODIR=2 THEN DXA=-1:DYA=0:DIR=2
120 IF S=11 OR S=10 OR S=9 THEN DXA=-1:DYA=0:DIR=2:IF ODIR=1 THEN DXA=1:DYA=0:DIR=1
130 IF S=14 THEN DYA=-1:DXA=0:DIR=4:IF ODIR=3 THEN DIR=3:DYA=1:DXA=0
140 IF S=13 THEN DYA=1:DXA=0:DIR=3:IF ODIR=4 THEN DIR=4:DYA=-1:DXA=0
145 COLOR 42:PLOT XA,YA:ODIR=DIR
150 XA=XA+DXA:YA=YA+DYA:L=LEN(XA$):XA$(L+1)=CHR$(XA):YA$(L+1)=CHR$(YA):LOCATE XA,YA,Z:IF Z<>32 THEN 200
162 SOUND 0,40,8,6:COLOR 170:PLOT XA,YA:IF L<WORMZ THEN 100
190 COLOR 32:PLOT ASC(XA$),ASC(YA$):XA$=XA$(2):YA$=YA$(2):GOTO 100
200 SOUND 0,200,10,16:POKE SCREEN+YA*40+XA,132:GOSUB 6600:IF Z<>BUG THEN 260
210 WORMZ=WORMZ+15+(3*LOC):IF WORMZ>240 THEN OWRMZ=240
220 XX=RND(2)*36+2:X=RND(1)*18+2:COLOR BUG:LOCATE XX,X,Y:IF Y<>32 THEN 220
221 SCORE=SCORE+100+LOC*7:FOR DEL=8 TO 16:SOUND O,55,10,17-DEL:NEXT DEL
226 HIT=HIT-1:IF HIT<1 THEN COLOR 160:PLOT 20,1:PLOT 19,20:PLOT 0,12:POKE SCREEN+12*40+39,128:HIT=0:GOTO 100
227 GOSUB 6600:PLOT XX,X:SOUND 0,100,10,16
230 GOTO 100
260 IF Z<>160 AND LIVES>1 THEN CNT=CNT-1:GOSUB 7500:GOTO 290
265 IF Z<>160 THEN CNT=CNT-1:GOTO 7500
270 FOR DEL=1 TO 16:SOUND 0,90,10,17-DEL:NEXT DEL
271 GOSUB 7000:POSITION 0,23
275 FOR DEL=1 TO 24:PRINT :SOUND 0,DEL,10,10:NEXT DEL
280 LOC=LOC+1:WORMZ=5:CNT=0
285 IF LOC>EXTRA THEN GOSUB 9100
290 GRAPHICS 0:COLOR 35:POKE 752,1:POKE 710,0:GOSUB 6500:POKE 712,162
291 POKE 710,ASC(BOL$(LOC))
300 ON LOC GOTO 5020,400,500,550,600,700,800,450,550,1000,1100,1200
399 GOTO 5015
400 REM SECOND SCREEN
410 PLOT 5,10:DRAWTO 35,10
420 GOTO 5020
450 REM SCREEN
460 PLOT 5,10:DRAWTO 35,10:PLOT 18,5:DRAWTO 18,20
470 GOTO 5020
500 REM THE FOUTH SCREEN
510 PLOT 5,5:DRAWTO 35,5
520 PLOT 5,16:DRAWTO 35,16
530 GOTO 5020
550 REM FRAME 5
560 PLOT 7,6:DRAWTO 33,6
575 PLOT 18,7:DRAWTO 18,20
580 GOTO 5020
600 REM FRAME 6
610 PLOT 1,10:DRAWTO 18,10:PLOT 22,10:DRAWTO 38,10
620 GOTO 5020
700 REM FRAME 7
710 FOR I=6 TO 14:PLOT 6,I:DRAWTO 12,I:PLOT 20,I:DRAWTO 32,I:NEXT I
720 GOTO 5020
800 REM FRAME 8
811 PLOT 1,8:DRAWTO 18,8
812 PLOT 1,15:DRAWTO 18,15
813 PLOT 15,12:DRAWTO 38,12
890 GOTO 5020
900 REM THE 8 FRAME
910 FOR I=5 TO 12 STEP 3:PLOT 11,I:DRAWTO 30,I:NEXT I
920 GOTO 5020
1000 FOR I=2 TO 19:PLOT 1,I:DRAWTO 38,I:NEXT I:COLOR 32:FOR I=2 TO 19:PLOT 1,I:DRAWTO 22,I:NEXT I:GOTO 5020
1100 FOR I=2 TO 19:PLOT 1,I:DRAWTO 38,I:NEXT I:COLOR 32:FOR I=2 TO 19:PLOT 1,I:DRAWTO 30,I:NEXT I:COLOR 35
1101 GOTO 400
1200 REM YOU WIN
1205 FOR QZ=1 TO 3
1210 GRAPHICS 18
1211 POSITION 4,5:PRINT #6;"NERM'S HOME"
1212 PRINT #6;" THANK YOU"
1215 FOR G=1 TO 5
1220 FOR I=1 TO 10
1229 SOUND 1,I+200,10,16-I
1230 SOUND 0,I+6,10,I+5:POKE 712,I*16
1240 NEXT I:NEXT G
1245 FOR I=1 TO 200:SOUND 0,I,10,15:NEXT I
1250 NEXT QZ:GOTO 7700
5000 GOSUB 10000:REM UP THE GAME
5005 GOSUB 11100:BUG=33
5010 DIM XA$(250),YA$(250),XB$(250),YB$(250),A$(15),B$(15)
5011 SPEED=35:LIVES=4:SCORE=0:LOC=1:GOSUB 5500:HIT=5:WORMZ=5:EXTRA=2
5015 GRAPHICS 0:POKE 752,1:POKE 710,0:GOSUB 6500:POKE 710,ASC(BOL$(LOC)):POKE 77,0:POKE 712,162
5020 XA$="":YA$="":XB$="":YB$="":XA=20:YA=19:XB=25:YB=20:DXA=0:DXB=0:DYA=-1:DYB=-1:T=0:IF HIT<0 THEN HIT=0
5021 IF LOC=3 THEN YA=15
5030 DIR=4:IF HIT>5 THEN HIT=5
5050 COLOR 35:PLOT 0,1:DRAWTO 39,1:DRAWTO 39,20:DRAWTO 0,20:DRAWTO 0,1
5056 IF HIT<1 THEN COLOR 160:PLOT 20,1:PLOT 19,20:PLOT 0,12:POKE SCREEN+12*40+39,128:HIT=0:GOTO 150
5060 XX=RND(2)*36+2:X=RND(1)*18+2:COLOR BUG:LOCATE XX,X,Y:IF Y<>32 THEN 5060
5065 PLOT XX,X
5085 GOTO 150
5090 GOTO 220
5500 REM START
5510 GRAPHICS 18:POKE 712,15
5520 POSITION 5,5:PRINT #6;"get ready"
5530 RESTORE 5600
5540 FOR X=1 TO 14:READ NN:SOUND 0,NN,10,10:SOUND 1,NN+1,10,5:FOR D=1 TO 25:NEXT D:NEXT X
5545 SOUND 0,0,0,0:SOUND 1,0,0,0
5550 RETURN
5600 DATA 121,91,0,91,81,0,81,72,60,72,60,72,91,0,121,91,0,91
6500 DL=PEEK(560)+256*PEEK(561)
6501 SOUND 0,0,0,0
6502 POKE 756,CHSET/256
6550 FOR I=0 TO 20
6560 POKE DL+6+I,4
6570 NEXT I
6572 POKE 712,0
6573 POKE DL+6+20,4:POKE DL+6+1,132
6574 POKE DL+6+25,65:POKE DL+6,6:POKE DL+3,6+64:POKE 54286,192
6575 GOSUB 6600
6580 RETURN
6600 REM PRINT SCORE
6605 POSITION 0,0:PRINT "score ";SCORE
6606 POSITION 12,0:PRINT "room ";LOC
6610 POSITION 19,0:PRINT " mushrooms ";HIT;" lives ";LIVES
6620 RETURN
7000 REM CLEAN UP THE CENTIPEDE
7002 SPEED=SPEED-5
7004 GOSUB 6600:HIT=5
7005 L=LEN(XA$)
7010 FOR I=1 TO L-1
7190 COLOR 32:PLOT ASC(XA$),ASC(YA$):XA$=XA$(2):YA$=YA$(2)
7200 NEXT I
7210 RETURN
7500 REM OOPS
7510 GRAPHICS 18:POKE 712,ASC(BOL$(LOC))
7515 SPEED=SPEED-5
7520 POSITION 7,5:PRINT #6;"OOPS!"
7521 LIVES=LIVES-1
7525 FOR DEL=1 TO 20:NEXT DEL
7530 FOR DEL=1 TO 10:SOUND 0,DEL*20,10,DEL+4:NEXT DEL
7550 FOR DEL=1 TO 20:NEXT DEL
7560 IF LIVES<1 THEN 7700
7599 RETURN
7700 REM THE GAMES OVER
7705 SOUND 0,0,0,0
7710 GRAPHICS 17:POKE 710,0
7715 IF SCORE>HSCORE THEN HSCORE=SCORE:GOSUB 9000:GRAPHICS 17:POKE 710,0
7716 DL=PEEK(560)+256*PEEK(561)
7717 POKE DL+6+8,2:POKE DL+7,7:POKE DL+8,7
7718 POSITION 7,2:PRINT #6;"NERM "
7720 POSITION 2,5:PRINT #6;"your score ";SCORE
7730 POSITION 2,7:PRINT #6;"high score ";HSCORE
7735 GOSUB 7800:RESTORE 7790
7736 PRINT #6:PRINT #6;" PRESS TRIGGER"
7737 PRINT #6;" TO PLAY AGAIN,"
7738 PRINT #6;" ANY KEY TO END"
7740 FOR X=1 TO 10:READ PN:SOUND 0,PN,10,10:SOUND 1,PN+1,10,10:FOR D=1 TO 20:NEXT D:NEXT X
7745 SOUND 0,0,0,0:SOUND 1,0,0,0
7780 IF STRIG(0)=0 THEN GOTO 5011
7783 IF PEEK(53775)<255 THEN POKE 764,255:GRAPHICS 0:END
7785 GOTO 7780
7790 DATA 91,0,121,128,121,108,121,0,96,91
7800 REM RANK THE GAMER
7810 PRINT #6:PRINT #6;" YOU NEW RANK IS ";
7820 IF LOC=1 THEN PRINT #6;"ZERO"
7830 IF LOC=2 THEN PRINT #6;"ROOKIE"
7835 IF LOC=3 THEN PRINT #6;"NOVICE"
7836 IF LOC=4 THEN PRINT #6;"AVERAGE"
7837 IF LOC=5 THEN PRINT #6;"MASTER"
7838 IF LOC=6 THEN PRINT #6;"GRAND MASTER"
7839 IF LOC=7 THEN PRINT #6;"WIZARD"
7840 IF LOC=8 THEN PRINT #6;"GRAND WIZARD"
7841 IF LOC=9 THEN PRINT #6;"SUPER STAR"
7842 IF LOC>9 THEN PRINT #6;"HALL OF FAME"
7860 RETURN
9000 REM NEW HIGH SCORE
9002 GRAPHICS 18
9003 POSITION 3,5:PRINT #6;"NEW HIGH SCORE"
9005 FOR Y=1 TO 3
9010 FOR N=1 TO 5
9020 FOR D=1 TO 5:SOUND 1,D*20,10,5:NEXT D
9025 POKE 712,N*20
9030 SOUND 0,N*30,10,7
9050 NEXT N
9060 NEXT Y
9065 FOR D=1 TO 30:NEXT D
9070 POKE 712,163:RETURN
9100 REM EXTRA LIFE
9110 GRAPHICS 17
9115 POSITION 5,5:PRINT #6;"BONUS LIFE"
9130 FOR J=100 TO 200
9140 SOUND 0,J,10,5:SOUND 1,200-J,10,5
9145 POKE 712,J
9150 NEXT J
9160 SOUND 0,0,0,0:SOUND 1,0,0,0
9170 EXTRA=EXTRA+3
9180 LIVES=LIVES+1
9190 RETURN
10000 DIM DUM(10),BOL$(100):GRAPHICS 17
10001 RESTORE 10015:FOR I=1 TO 19:READ A:BOL$(I,I)=CHR$(A):NEXT I
10015 DATA 196,52,164,198,18,54,50,196
10016 DATA 52,50,180,196,74,79,76,76,76,76,76
10017 DL=PEEK(560)+256*PEEK(561)
10018 POKE DL+10,7
10020 POSITION 2,2:PRINT #6;" WELCOME TO"
10025 POSITION 3,7:PRINT #6;"nerm of bemer"
10035 POSITION 0,14:PRINT #6;"HIT TRIGGER TO START"
10045 IF STRIG(0)=1 THEN 10045
10060 GOSUB 20110:RETURN
11100 CHBAS=756
11110 CHSET=(PEEK(106)-8)*256
11143 DIM E$(50)
11144 RESTORE 11160:FOR I=1 TO 41:READ A:E$(I,I)=CHR$(A):NEXT I
11145 CD=USR(ADR(E$),CHSET,4)
11160 DATA 104,104,133,207,104,133,206,104
11162 DATA 104,133,212,169,0,133,204,169
11164 DATA 224,133,205,162,1,160,0,177
11166 DATA 204,145,206,200,208,249,230,205
11168 DATA 230,207,232,228,212,208,240,96,0
11180 POKE 756,CHSET/256
11190 RESTORE 11240:GRAPHICS 19
11200 FOR I=0 TO 31:READ A:POKE CHSET+I,A:NEXT I
11205 FOR I=0 TO 7:READ A:POKE CHSET+80+I,A:NEXT I
11240 DATA 0,00,00,00,00,00,0,0
11250 DATA 0,20,85,85,255,40,40,000
11251 DATA 85,85,85,85,85,85,85,85
11252 DATA 170,190,190,190,190,190,170,170
11260 DATA 000,020,255,255,255,255,020,000
11270 RETURN
20110 RESTORE 20150:FOR I=0 TO 10
20120 READ C
20130 POKE 1536+I,C
20140 NEXT I
20150 DATA 72,169,0,141,10,212,141,26,208,104,64
20170 POKE 512,0:POKE 513,6:RETURN